Improvement in quality of life is accompanied with people's ever-increasing requirements for high-quality audio. Compared with mono audio, stereo audio provides sense of direction and sense of distribution of sound sources and can improve clarity and intelligibility of information, and is therefore highly favored by people.
Currently, there is a known technology for transmitting a stereo audio signal. An encoder converts a stereo signal into a mono audio signal and a parameter such as an inter-channel time difference (ITD), separately encodes the mono audio signal and the parameter, and transmits an encoded mono audio signal and an encoded parameter to a decoder. After obtaining the mono audio signal, the decoder further restores the stereo signal according to the parameter such as the ITD. Therefore, low-bit and high-quality transmission of the stereo signal can be implemented.
In the foregoing technology, based on a sampling rate of an input audio signal, the encoder can determine a limiting value Tmax of an ITD parameter at the sampling rate, and therefore may perform searching and calculation at a specified step within a search range [Tmax, Tmax] based on the input audio signal, to obtain the ITD parameter. Therefore, regardless of channel quality, a same search range and a same search step are used.
However, different channel quality requires different precision of an ITD parameter. For example, relatively poor channel quality requires relatively low precision of an ITD parameter. In this case, if a relatively large search range and a relatively small search step are still used, computing resources are wasted, and processing efficiency is severely affected.
Therefore, a technology is expected to be provided, so that precision of a determined ITD parameter can adapt to channel quality.